package com.jecy.base.baseproject.base.service;

import com.jecy.base.baseproject.base.enums.SqlOrderEnum;
import org.apache.ibatis.session.RowBounds;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * <p>
 * <p>
 *
 * @author huijun
 * @create 2017-11-10 下午 6:48
 **/
public interface IBaseService<T> {
    List<T> select(T var1);

    List<T> selectAll();

    T save(T var1);

    boolean delete(T var1);

    int selectCount(T var1);

    int selectCount(Map<String, Object> condition, Class<T> clazz);

    T selectOne(T var1);

    List<T> selectByExample(Map<String, Object> conition);

    List<T> selectByExample(Object object);

    List<T> selectByExampleAndRowBounds(Object var1, RowBounds var2);

    List<T> selectByConditionAndRowBoundsForEntity(Map<String, Object> condition, RowBounds var2);

    List<T> listByCondition(Map<String, Object> condition, String orderBy, SqlOrderEnum sqlOrderEnum);

    List<T> listByConditionForPage(Map<String, Object> condition, String orderBy, SqlOrderEnum sqlOrderEnum, RowBounds var2);

    boolean updateByExample(T var1, Object var2);

    boolean updateByExampleSelective(T var1, Object var2);

    int insertSelective(T var1);

    List<T> selectByRowBounds(T var1, RowBounds var2);

    List<T> selectByConditionAndRowBounds(Map<String, Object> conition, RowBounds var2);

    boolean updateByConditionSelective(T entity, Map<String, Object> condition);

    boolean updateByListSelective(T entity, List<Long> ids);

    boolean updateByIdSelective(T entity, Long id);

    boolean updateById(T entity, Long id);

    int insertUseGeneratedKeys(T var1);

}
